package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 系统角色表
 *
 * @author 
 */
public class SysMenu extends BaseEntity implements Serializable {
    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer menu_id;

    /**
     * 顶级父ID
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer topPid;

    /**
     * 父ID
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer pid;

    /**
     * 名称
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private String title;

    /**
     * 值
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private String menuKey;

    /**
     * 类型
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer type;

    /**
     * 排序
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer sort;

    /**
     * 状态
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer status;

    /**
     * 备注
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private String remark;

    /**
     * 创建人
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer createUserId;

    /**
     * 创建时间
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Date createDate;

    /**
     * 更新人
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Integer updateUserId;

    /**
     * 更新时间
     *
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private Date updateDate;

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method returns the value of the database column education..sys_menu.menu_id
     *
     * @return the value of education..sys_menu.menu_id
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getMenu_id() {
        return menu_id;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withMenu_id(Integer menu_id) {
        this.setMenu_id(menu_id);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.menu_id
     *
     * @param menu_id the value for education..sys_menu.menu_id
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setMenu_id(Integer menu_id) {
        this.menu_id = menu_id;
    }

    /**
     * This method returns the value of the database column education..sys_menu.topPid
     *
     * @return the value of education..sys_menu.topPid
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getTopPid() {
        return topPid;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withTopPid(Integer topPid) {
        this.setTopPid(topPid);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.topPid
     *
     * @param topPid the value for education..sys_menu.topPid
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setTopPid(Integer topPid) {
        this.topPid = topPid;
    }

    /**
     * This method returns the value of the database column education..sys_menu.pid
     *
     * @return the value of education..sys_menu.pid
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getPid() {
        return pid;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withPid(Integer pid) {
        this.setPid(pid);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.pid
     *
     * @param pid the value for education..sys_menu.pid
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setPid(Integer pid) {
        this.pid = pid;
    }

    /**
     * This method returns the value of the database column education..sys_menu.title
     *
     * @return the value of education..sys_menu.title
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public String getTitle() {
        return title;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withTitle(String title) {
        this.setTitle(title);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.title
     *
     * @param title the value for education..sys_menu.title
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * This method returns the value of the database column education..sys_menu.menuKey
     *
     * @return the value of education..sys_menu.menuKey
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public String getMenuKey() {
        return menuKey;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withMenuKey(String menuKey) {
        this.setMenuKey(menuKey);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.menuKey
     *
     * @param menuKey the value for education..sys_menu.menuKey
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setMenuKey(String menuKey) {
        this.menuKey = menuKey;
    }

    /**
     * This method returns the value of the database column education..sys_menu.type
     *
     * @return the value of education..sys_menu.type
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getType() {
        return type;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withType(Integer type) {
        this.setType(type);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.type
     *
     * @param type the value for education..sys_menu.type
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * This method returns the value of the database column education..sys_menu.sort
     *
     * @return the value of education..sys_menu.sort
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getSort() {
        return sort;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withSort(Integer sort) {
        this.setSort(sort);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.sort
     *
     * @param sort the value for education..sys_menu.sort
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     * This method returns the value of the database column education..sys_menu.status
     *
     * @return the value of education..sys_menu.status
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getStatus() {
        return status;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withStatus(Integer status) {
        this.setStatus(status);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.status
     *
     * @param status the value for education..sys_menu.status
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * This method returns the value of the database column education..sys_menu.remark
     *
     * @return the value of education..sys_menu.remark
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public String getRemark() {
        return remark;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withRemark(String remark) {
        this.setRemark(remark);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.remark
     *
     * @param remark the value for education..sys_menu.remark
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * This method returns the value of the database column education..sys_menu.createUserId
     *
     * @return the value of education..sys_menu.createUserId
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.createUserId
     *
     * @param createUserId the value for education..sys_menu.createUserId
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * This method returns the value of the database column education..sys_menu.createDate
     *
     * @return the value of education..sys_menu.createDate
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.createDate
     *
     * @param createDate the value for education..sys_menu.createDate
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method returns the value of the database column education..sys_menu.updateUserId
     *
     * @return the value of education..sys_menu.updateUserId
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.updateUserId
     *
     * @param updateUserId the value for education..sys_menu.updateUserId
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     * This method returns the value of the database column education..sys_menu.updateDate
     *
     * @return the value of education..sys_menu.updateDate
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public SysMenu withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu.updateDate
     *
     * @param updateDate the value for education..sys_menu.updateDate
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", menu_id=").append(menu_id);
        sb.append(", topPid=").append(topPid);
        sb.append(", pid=").append(pid);
        sb.append(", title=").append(title);
        sb.append(", menuKey=").append(menuKey);
        sb.append(", type=").append(type);
        sb.append(", sort=").append(sort);
        sb.append(", status=").append(status);
        sb.append(", remark=").append(remark);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysMenu other = (SysMenu) that;
        return (this.getMenu_id() == null ? other.getMenu_id() == null : this.getMenu_id().equals(other.getMenu_id()))
            && (this.getTopPid() == null ? other.getTopPid() == null : this.getTopPid().equals(other.getTopPid()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getMenuKey() == null ? other.getMenuKey() == null : this.getMenuKey().equals(other.getMenuKey()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()));
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMenu_id() == null) ? 0 : getMenu_id().hashCode());
        result = prime * result + ((getTopPid() == null) ? 0 : getTopPid().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getMenuKey() == null) ? 0 : getMenuKey().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        return result;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:44:47 CST 2020
     */
    public enum Column {
        menu_id("menu_id", "menu_id", "INTEGER", false),
        topPid("topPid", "topPid", "INTEGER", false),
        pid("pid", "pid", "INTEGER", false),
        title("title", "title", "VARCHAR", false),
        menuKey("menuKey", "menuKey", "VARCHAR", false),
        type("type", "type", "INTEGER", false),
        sort("sort", "sort", "INTEGER", false),
        status("status", "status", "INTEGER", false),
        remark("remark", "remark", "VARCHAR", false),
        createUserId("createUserId", "createUserId", "INTEGER", false),
        createDate("createDate", "createDate", "TIMESTAMP", false),
        updateUserId("updateUserId", "updateUserId", "INTEGER", false),
        updateDate("updateDate", "updateDate", "TIMESTAMP", false);

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private static final String BEGINNING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private static final String ENDING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private final String column;

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private final boolean isColumnNameDelimited;

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private final String javaProperty;

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        private final String jdbcType;

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String value() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String getValue() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:44:47 CST 2020
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}